package com.CST.mapper.cst.cb;

import com.CST.bo.zx.ApprovalUserBO;
import com.CST.dto.cb.SysUserDTO;
import com.CST.entity.cb.BdSysUser;
import com.CST.entity.zx.ZxAuth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
/**
 * <p>
 * 用户管理 Mapper接口
 * </p>
 * @author y
 * @since 2021-09-27
 */
@Mapper
@Repository
public interface BdSysUserMapper extends BaseMapper<BdSysUser> {

    /**
     * <p>查询</p >
     * @param realName, userName
     * @author y
     * @since 2021/10/15 14:29
     * @return java.util.List<com.CST.entity.cb.BdSysUser>
     */
    List<BdSysUser> getUsers(@Param("realName") String realName,@Param("userName") String userName);

    List<BdSysUser> getUser(@Param("userName") String userName);


    /**
     * <p>列表查询</p >
     * @param sysUserDto
     * @author y
     * @since 2021/10/09 10:34
     * @return java.util.List<com.CST.entity.cb.BdSysUser>
     */
    List<BdSysUser> getSysUserList(SysUserDTO sysUserDto);

    int updateSysUser(BdSysUser bdSysUser);

    BdSysUser getUserById(@Param("id") String leaderId);

    List<BdSysUser> getAllUsers(@Param("userName") String userName);

    List<BdSysUser> getSelectUser(@Param("userNameList") List<String> userNameList);

    List<ZxAuth> getAllZxAuth(ApprovalUserBO approvalUserBO);


    boolean updatePassword(@Param("userId") String userId, @Param("crypt")String crypt);
}
